Glasgow | 26-ITP-Jan| Martin McLean |Sprint 1| coursework#978
Glasgow | 26-ITP-Jan| Martin McLean |Sprint 1| coursework#978mjm-git185 wants to merge 6 commits intoCodeYourFuture:mainfrom
Conversation
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
This works, but there can be some improvements.
Check that elements is an array before calling .filter(), and do an early return if it is empty.
Sorting the entire array is unnecessary if you only need the maximum value.
Consider using Number.isFinite() to ensure only valid numbers are included, so no need for typeof element === "number"
There was a problem hiding this comment.
hi I've been working on this but i'm having some trouble with the number.isFinite would you be free at some point tomorrow to go over it please
There was a problem hiding this comment.
You could book a pair programming session.
Before then, try to read this:
https://www.w3schools.com/jsref/jsref_isfinite_number.asp
You just need to replace that check, but you need to know why you are doing it.
Changelist
I have titled my PR with Region | Cohort | FirstName LastName | Sprint | Assignment Title
My changes meet the requirements of the task
I have tested my changes
My changes follow the style guide
my coursework